package com.young.test.util;

import org.apache.log4j.Logger;

public class StaticFactoryUtil {
	/**
	 * Logger for this class
	 */
	private static final Logger logger = Logger.getLogger(StaticFactoryUtil.class);
	
	private static StaticFactoryUtil bean = new StaticFactoryUtil();
	
	private String name;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public StaticFactoryUtil(){}
	
	private StaticFactoryUtil(String name){
		this.name = name;
	}
	
	public static StaticFactoryUtil createInstance(){
		return bean;
	}
	
	public static StaticFactoryUtil createInstance(String name){
		return new StaticFactoryUtil(name);
	}
	
	public void info(){
		logger.info("My name is :"+name);
	}

}
